package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.UserCoupon;
import com.nbsaas.boot.marketing.api.domain.request.UserCouponRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 用户优惠券请求对象转换成实体对象
*/

public class UserCouponEntityConvert  implements Converter<UserCoupon, UserCouponRequest> {

    @Override
    public UserCoupon convert(UserCouponRequest source) {
        UserCoupon result = new UserCoupon();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

